import request from '@/utils/request'

export function attPaginate(form, page, page_size) {
  return request({
    url: '/api/pajx/equip/att/paginate',
    method: 'post',
    data: {
      page_num: page,
      page_size: page_size,
      hxy_scl_id: form.hxy_scl_id,
      equ_no: form.equ_no
    }
  })
}

export function attSave(form) {
  return request({
    url: '/api/pajx/equip/att/save',
    method: 'post',
    data: {
      hxy_scl_id: form.hxy_scl_id,
      equ_type: form.equ_type,
      att_type: form.att_type,
      att_inout: form.att_inout,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position,
      apn_sim: form.apn_sim,
      server_ip: form.server_ip,
      server_port: form.server_port,
      soft_ver: form.soft_ver,
      hard_ver: form.hard_ver,
      real_exists_flag: form.real_exists_flag
    }
  })
}

export function attDetail(equ_id) {
  return request({
    url: '/api/pajx/equip/att/detail',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function attUpdate(form) {
  return request({
    url: '/api/pajx/equip/att/update',
    method: 'post',
    data: {
      equ_id: form.equ_id,
      equ_type: form.equ_type,
      att_type: form.att_type,
      att_inout: form.att_inout,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position,
      apn_sim: form.apn_sim,
      server_ip: form.server_ip,
      server_port: form.server_port,
      soft_ver: form.soft_ver,
      hard_ver: form.hard_ver,
      real_exists_flag: form.real_exists_flag
    }
  })
}

export function attDelete(equ_id) {
  return request({
    url: '/api/pajx/equip/att/delete',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function telPaginate(form, page, page_size) {
  return request({
    url: '/api/pajx/equip/tel/paginate',
    method: 'post',
    data: {
      page_num: page,
      page_size: page_size,
      hxy_scl_id: form.hxy_scl_id,
      equ_no: form.equ_no
    }
  })
}

export function telSave(form) {
  return request({
    url: '/api/pajx/equip/tel/save',
    method: 'post',
    data: {
      hxy_scl_id: form.hxy_scl_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position,
      apn_sim: form.apn_sim,
      server_ip: form.server_ip,
      server_port: form.server_port,
      soft_ver: form.soft_ver,
      hard_ver: form.hard_ver,
      real_exists_flag: form.real_exists_flag,
      permit_att: form.permit_att	
    }
  })
}

export function telDetail(equ_id) {
  return request({
    url: '/api/pajx/equip/tel/detail',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function telUpdate(form) {
  return request({
    url: '/api/pajx/equip/tel/update',
    method: 'post',
    data: {
      equ_id: form.equ_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position,
      apn_sim: form.apn_sim,
      server_ip: form.server_ip,
      server_port: form.server_port,
      soft_ver: form.soft_ver,
      hard_ver: form.hard_ver,
      real_exists_flag: form.real_exists_flag,
      permit_att: form.permit_att	
    }
  })
}

export function telDelete(equ_id) {
  return request({
    url: '/api/pajx/equip/tel/delete',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function cameraPaginate(form, page, page_size) {
  return request({
    url: '/api/pajx/equip/camera/paginate',
    method: 'post',
    data: {
      page_num: page,
      page_size: page_size,
      hxy_scl_id: form.hxy_scl_id,
      equ_no: form.equ_no
    }
  })
}

export function cameraSave(form) {
  return request({
    url: '/api/pajx/equip/camera/save',
    method: 'post',
    data: {
      hxy_scl_id: form.hxy_scl_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      gra_id: form.gra_id,
      cls_id: form.cls_id,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position,
      rtsp: form.rtsp,
      hls: form.hls,
      rtmp: form.rtmp,
      camera_status: form.camera_status,
      camera_use_type: form.camera_use_type,
      tea_control_flag: form.tea_control_flag,
      camera_scheme: form.camera_scheme	
    }
  })
}

export function cameraDetail(equ_id) {
  return request({
    url: '/api/pajx/equip/camera/detail',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function cameraUpdate(form) {
  return request({
    url: '/api/pajx/equip/camera/update',
    method: 'post',
    data: {
      equ_id: form.equ_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      gra_id: form.gra_id,
      cls_id: form.cls_id,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position,
      rtsp: form.rtsp,
      hls: form.hls,
      rtmp: form.rtmp,
      camera_status: form.camera_status,
      camera_use_type: form.camera_use_type,
      tea_control_flag: form.tea_control_flag,
      camera_scheme: form.camera_scheme	
    }
  })
}

export function cameraDelete(equ_id) {
  return request({
    url: '/api/pajx/equip/camera/delete',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function mealPaginate(form, page, page_size) {
  return request({
    url: '/api/pajx/equip/meal/paginate',
    method: 'post',
    data: {
      page_num: page,
      page_size: page_size,
      hxy_scl_id: form.hxy_scl_id,
      equ_no: form.equ_no
    }
  })
}

export function mealSave(form) {
  return request({
    url: '/api/pajx/equip/meal/save',
    method: 'post',
    data: {
      hxy_scl_id: form.hxy_scl_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position
    }
  })
}

export function mealDetail(equ_id) {
  return request({
    url: '/api/pajx/equip/meal/detail',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function mealUpdate(form) {
  return request({
    url: '/api/pajx/equip/meal/update',
    method: 'post',
    data: {
      equ_id: form.equ_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position
    }
  })
}

export function mealDelete(equ_id) {
  return request({
    url: '/api/pajx/equip/meal/delete',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function ledPaginate(form, page, page_size) {
  return request({
    url: '/api/pajx/equip/led/paginate',
    method: 'post',
    data: {
      page_num: page,
      page_size: page_size,
      hxy_scl_id: form.hxy_scl_id,
      equ_no: form.equ_no
    }
  })
}

export function ledSave(form) {
  return request({
    url: '/api/pajx/equip/led/save',
    method: 'post',
    data: {
      hxy_scl_id: form.hxy_scl_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position
    }
  })
}

export function ledDetail(equ_id) {
  return request({
    url: '/api/pajx/equip/led/detail',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}

export function ledUpdate(form) {
  return request({
    url: '/api/pajx/equip/led/update',
    method: 'post',
    data: {
      equ_id: form.equ_id,
      equ_type: form.equ_type,
      equ_provider: form.equ_provider,
      equ_vendor: form.equ_vendor,
      equ_name: form.equ_name,
      equ_desc: form.equ_desc,
      equ_position: form.equ_position
    }
  })
}

export function ledDelete(equ_id) {
  return request({
    url: '/api/pajx/equip/led/delete',
    method: 'post',
    data: {
      equ_id: equ_id
    }
  })
}